<?php

namespace app\common\validate;

use think\Validate;

class Permission extends Validate
{
    public $rule = [
        'id'=>'require',
        'name'=>'require',
        'controller'=>'require',
        'action'=>'require',
    ];

    public $message = [
        'id.require'=>'请选择操作对象',
        'name.require'=>'请输入权限名称',
        'controller.require'=>'请输入控制器',
        'action.require'=>'请输入操作',
    ];

    public $scene = [
        'save'=>['name','controller','action'],
        'update'=>['id','name','controller','action'],
    ];
}
